package com.bdqn.t382.service.impl;

import com.bdqn.t382.dao.NewsDao;
import com.bdqn.t382.dao.impl.NewsDaoImpl;
import com.bdqn.t382.factory.SimpleDaoFactory;
import com.bdqn.t382.pojo.News;
import com.bdqn.t382.service.NewsService;

public class NewsServiceImpl implements NewsService {
    NewsDao newsDao = new NewsDaoImpl();

    @Override
    public void save(News news) {
        newsDao.save(news);
    }

    private NewsDao dao;
    public void setDao(NewsDao dao) {
        this.dao = dao;
    }
    public void addNews(News news) {
        dao.save(news);
    }
}
